<template>
  <div class="setting_menu">
    <div
      class="menu_item"
      v-for="(item, index) in state.menulist"
      :key="index"
      :class="state.activemenu == item.value ? 'menu_item_active' : ''"
      @click="state.activemenu = item.value"
    >
      <div>{{ item.label }}</div>
      <div class="triangle-right" v-if="state.activemenu == item.value"></div>
    </div>
  </div>
</template>

<script setup>
const { settingtore, state } = inject('SettingStore')
</script>

<style lang="scss" scoped>
.setting_menu {
  width: 194px;
  height: 100%;
  background: #fff;
  margin-right: 2px;
  padding: 12px;
}
.menu_item {
  display: flex;
  justify-content: space-between;
  height: 32px;
  cursor: pointer;
  align-items: center;
  padding: 0 8px;
  font-family: AlibabaPuHuiTi_2_65_;
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
}
.menu_item_active {
  background-color: #3711d8;
  color: #fff;
}
.triangle-right {
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid #fff; /* 三角形的颜色 */
}
</style>